/**
 * 
 */
package com.sesame.daoimpl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sesame.dao.AdminLogDAO;
import com.sesame.domain.AdminLog;

/**
 * @author shubeta
 *
 */
public class AdminLogDAOImpl extends SqlMapClientDaoSupport implements AdminLogDAO {

    public void addAdminLog(AdminLog adminlog) {
        getSqlMapClientTemplate().insert("addAdminLog", adminlog);
    }

    public void deleteAdminLogById(Integer id) {
        getSqlMapClientTemplate().delete("deleteAdminLogById", id);
    }
    
    @SuppressWarnings("unchecked")
    public List<AdminLog> getAllAdminLog() {
        return (List<AdminLog>) getSqlMapClientTemplate().queryForList("getAllAdminLog");
    }

    public AdminLog getAdminLogById(Integer id) {
        return (AdminLog) getSqlMapClientTemplate().queryForObject("getAdminLogById", id);
    }

    public void updateAdminLog(AdminLog adminlog) {
        getSqlMapClientTemplate().update("updateAdminLog", adminlog);
    }

}
